package facade;

import java.awt.BorderLayout;
import java.net.Socket;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class Graphic {
	protected static JMenuBar bar;
	protected static JButton JoinSession;
	protected static JButton StartEditing;
	protected static JButton StopEditing;
	protected static JButton LeaveSession;
	protected static JButton Exit;
	protected static JScrollPane Scroll;
	public static JTextArea ClientTextArea= new JTextArea("Welcome Client",5,20);
	
	public Graphic(){
		initializeGraphicComponents();
	}

	public static void initializeGraphicComponents() {
		JFrame frame= new JFrame("TextArea frame");
	  	  Scroll = new JScrollPane(ClientTextArea);
	      bar=new JMenuBar();
	      JoinSession=new JButton("Join The Session");
		  StartEditing=new JButton("Start Editing");
		  StopEditing=new JButton("Stop Editing");
		  LeaveSession=new JButton("Leave The Session");
		  Exit=new JButton("Exit");
		  bar.add(JoinSession);
		  bar.add(StartEditing);
		  bar.add(StopEditing);
		  bar.add(LeaveSession);
		  bar.add(Exit);
		  frame.setJMenuBar(bar);
		  frame.add(Scroll,BorderLayout.CENTER);
	  	  frame.setSize(520,450);
	  	  frame.setVisible(true);
	  	  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}	
}
